<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of build_redundant_table</title>
  <meta name="keywords" content="build_redundant_table">
  <meta name="description" content="UNTITLED Summary of this function goes here">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html v1.5 &copy; 2003-2005 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../../m2html.css">
</head>
<body>
<a name="_top"></a>
<div><a href="../../index.html">Home</a> &gt;  <a href="../index.html">CO4OI</a> &gt; <a href="index.html">misc</a> &gt; build_redundant_table.m</div>

<!--<table width="100%"><tr><td align="left"><a href="../../index.html"><img alt="<" border="0" src="../../left.png">&nbsp;Master index</a></td>
<td align="right"><a href="index.html">Index for CO4OI/misc&nbsp;<img alt=">" border="0" src="../../right.png"></a></td></tr></table>-->

<h1>build_redundant_table
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>UNTITLED Summary of this function goes here</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>function [ Tr ] = build_redundant_table( T ) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre class="comment">UNTITLED Summary of this function goes here
   Detailed explanation goes here</pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../../matlabicon.gif)">
</ul>
This function is called by:
<ul style="list-style-image:url(../../matlabicon.gif)">
</ul>
<!-- crossreference -->



<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function [ Tr ] = build_redundant_table( T )</a>
0002 <span class="comment">%UNTITLED Summary of this function goes here</span>
0003 <span class="comment">%   Detailed explanation goes here</span>
0004 M=size(T,1);
0005 
0006 Tr=zeros(6*M,3);
0007 iT=1;
0008 
0009 <span class="keyword">for</span> i=1:M
0010     
0011     <span class="keyword">if</span>(T(i,1)&gt;T(i,2) &amp;&amp; T(i,2)&gt;T(i,3))
0012         Tr(iT,:)=T(i,:);
0013         iT=iT+1;
0014         Tr(iT,:)=[T(i,1),T(i,3),T(i,2)];
0015         
0016         iT=iT+1;
0017         Tr(iT,:)=[T(i,2),T(i,1),T(i,3)];
0018         
0019         iT=iT+1;
0020         Tr(iT,:)=[T(i,2),T(i,3),T(i,1)];
0021         
0022         iT=iT+1;
0023         Tr(iT,:)=[T(i,3),T(i,1),T(i,2)];
0024         
0025         iT=iT+1;
0026         Tr(iT,:)=[T(i,3),T(i,2),T(i,1)];
0027         iT=iT+1;
0028         
0029     <span class="keyword">elseif</span> (T(i,1)&gt;T(i,2) &amp;&amp; T(i,2)==T(i,3))
0030         Tr(iT,:)=T(i,:);
0031         iT=iT+1;
0032         Tr(iT,:)=[T(i,2),T(i,1),T(i,3)];
0033         
0034         iT=iT+1;
0035         Tr(iT,:)=[T(i,3),T(i,2),T(i,1)];
0036         
0037         iT=iT+1;
0038         
0039     <span class="keyword">elseif</span> (T(i,1)==T(i,2) &amp;&amp; T(i,2)&gt;T(i,3))
0040         Tr(iT,:)=T(i,:);
0041         iT=iT+1;
0042         Tr(iT,:)=[T(i,1),T(i,3),T(i,2)];
0043         
0044         iT=iT+1;
0045         Tr(iT,:)=[T(i,3),T(i,1),T(i,2)];
0046         
0047         iT=iT+1; 
0048         
0049     <span class="keyword">elseif</span> (T(i,1)==T(i,2) &amp;&amp; T(i,2)==T(i,3))
0050         Tr(iT,:)=T(i,:);
0051         iT=iT+1;
0052     <span class="keyword">end</span>
0053     
0054     Tr(all(Tr==0,2),:)=[];
0055     
0056 
0057 <span class="keyword">end</span>
0058</pre></div>
<hr><address>Generated on Thu 18-Jul-2013 19:25:15 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address>
</body>
</html>